<?php
function chas($e) { return 100; }
$current_users_points = chas($_SESSION['userid']);
$bonus = rand(-1000, 1000);
$new_user_points = $current_users_points + $bonus;
echo $current_users_points . ($bonus >= 0 ? '+' : '') . $bonus . ' = ' . $new_user_points;
1